package com.ae.base.client.event;

import com.ae.base.ModConstant;
import com.ae.base.client.PlacedItemTER;
import com.ae.base.register.BlockRegister;
import com.ae.base.register.TileRegister;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.RenderTypeLookup;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.client.registry.ClientRegistry;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;

@Mod.EventBusSubscriber(modid = ModConstant.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD, value = Dist.CLIENT)
public class BlockRender {
    @SubscribeEvent
    public static void TER(FMLClientSetupEvent event) {
        event.enqueueWork(() -> ClientRegistry.bindTileEntityRenderer(TileRegister.PLACED_ITEM_TILE.get(), PlacedItemTER::new));
    }

    @SubscribeEvent
    public static void renderTranslucent(FMLClientSetupEvent event) {
        event.enqueueWork(() -> RenderTypeLookup.setRenderLayer(BlockRegister.PLACED_ITEM.get(), RenderType.translucent()));
    }
}
